PESetFormula

Use PESetFormula to change the specified formula to the formula string you supply as a parameter. This function will only change the text of a formula which already exists in the report; you cannot use it to add a new formula. This function can be used by itself to replace the formula string for a known formula.

This function can also be used as one of a series of functions (PEGetFormula; PEGetHandleString; and PESetFormula). The series can be used in a Custom-Print Link to identify and then change an existing formula at print time in response to a user selection. When you give the user the ability to change the formula at print time, your link must include code to replace formulaString with a user-generated value.

C Syntax
BOOL CRPE_API PESetFormula (
        short printJob,
        const char *formulaName,
        const char FAR *formulaString );
Parameters

printJob

Specifies the print job for which you want to set a new formula string.

formulaName

Specifies a pointer to the null-terminated string that contains the name of the formula for which you want to set a new formula string.

formulaString

Specifies a pointer to the null-terminated string that you want to replace the existing formula string.

Returns
Remarks
VB Syntax

VB Sample Code for modifying formulas

Declare Function PESetFormula Lib "crpe32.dll" (ByVal printJob As 
Integer, ByVal FormulaName As String, ByVal FormulaString As String) As 
Integer
Delphi Syntax

Delphi code for getting/setting formulas

function PESetFormula (
    printJob: Word;
    formulaName: PChar;
    formulaString: PChar
    ): Bool stdcall;
dBASE for Windows Syntax
EXTERN CLOGICAL PESetFormula (CWORD, CSTRING, CSTRING) CRPE.DLL


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com